<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>search result</title>
    </head>
    <body>
        <div class="body">
            <h1>搜尋結果</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            
            <table>
            <tr>
            	<td>uid</td>
            	<td style="width:100px;">姓名</td>
            	<td>抵達桃園機場</td>
            	<td>抵達桃園高鐵</td>
            	<td>抵達左營高鐵</td>
            	<td>抵達認證中心</td>
            	<td>抵達旅館</td>
            	<td>離開旅館</td>
            	<td>離開左營高鐵</td>
            	<td>離開小港機場</td>
            	<td>離開桃園高鐵</td>
            	<td>離開桃園機場</td>
            	
            	<td>性別</td>
            	<td>國別</td>
            	<td>運動項目</td>
            	<td>預計抵達時間</td>
            	<td>預計離開時間</td>
            </tr>
			<g:each var="person" in="${people}">
			<g:if test="${person.extra}">
				<tr style="background-color:red;">
			</g:if>
			<g:else>
				<tr>
			</g:else>
				<td>${person.uid}</td>
				<td><g:link action="show" id="${person.id}">${person.name}</g:link></td>
				<td><g:if test="${person.nAirportComeAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.nAirportComeAt}" /></g:if></td>
				<td><g:if test="${person.nTrainComeAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.nTrainComeAt}" /></g:if></td>
				<td><g:if test="${person.sTrainComeAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.sTrainComeAt}" /></g:if></td>
				<td><g:if test="${person.centerComeAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.centerComeAt}" /></g:if></td>
				<td><g:if test="${person.hotelComeAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.hotelComeAt}" /></g:if></td>
				<td><g:if test="${person.hotelGoAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.hotelGoAt}" /></g:if></td>
				<td><g:if test="${person.sTrainGoAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.sTrainGoAt}" /></g:if></td>
				<td><g:if test="${person.sAirportGoAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.sAirportGoAt}" /></g:if></td>
				<td><g:if test="${person.nTrainGoAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.nTrainGoAt}" /></g:if></td>
				<td><g:if test="${person.nAirportGoAt.getYear() > 70}"><g:formatDate format="MM-dd HH:mm" date="${person.nAirportGoAt}" /></g:if></td>
				
				<td>${person.sex}</td>
				<td>${person.nation?.name}</td>
				<td>${person.sport?.name}</td>
				<td><g:formatDate format="MM-dd HH:mm" date="${person.comeDateAt}" /></td>
				<td><g:formatDate format="MM-dd HH:mm" date="${person.goDateAt}" /></td>
			</tr>
			</g:each>
			</table>

        </div>
    </body>
</html>
